home *** CD-ROM | disk | FTP | other *** search
- rem [
- rem Name: u.w31batch.bat
- rem
- rem Derived from: (original)
- rem
- rem Author: David Lillie
- rem
- rem Created on: Sep 1996
- rem
- rem Sccs ID: @(#)u.w31batch.bat 1.17 10/02/97
- rem
- rem Coding Stds:
- rem
- rem Purpose: Windows 3.1x update batch file for SoftPC TURBO and
- rem SoftWindows. This file triggers the process of copying
- rem the new Insignia drivers to the C: drive and then
- rem patches the Windows 3.1x drivers.
- rem
- rem Parameters: 1 FSA directory for split Windows setup.
- rem = c:\windows for hard disk only setup.
- rem 2 Windows system directory.
- rem 3 Intel OS; must be in a form understood by
- rem inspatch.exe i.e. "win311" or "wfw311"
- rem 4 Host OS ("mac", "unix", etc.)
- rem 5 two-letter language ID
- rem 6 old serial number (8 hex digits)
- rem
- rem Copyright 1997 Insignia Solutions PLC. All rights reserved.
- rem ]
-
-
- if not exist %2\user.exe goto End
-
- echo Updating your configuration. Please wait...
-
- rem Determine whether this is a new copy of Windows or an upgrade.
- rem A new copy of Windows is identified by:
- rem 1. new clean disk - serial no. = F0xxxxxx
- rem 2. user installed Windows over DOS - serial no. = F[14-F]xx[0-1]xxx
-
- ibatch majorVer = 0x%6 ">>" 24 #04lx
- ibatch os = 0x%6 "&" 0xf000 #06lx
- echo %0: majorVer=%majorVer% os=%os% >>c:\insignia\up.log
- itest %majorVer% "==" 0xf0
- if errorlevel 1 goto newWin
- itest %majorVer% ">=" 0xf4
- if not errorlevel 1 itest %majorVer% "==" 0xf1
- if errorlevel 1 itest %os% "<=" 0x1000
- if errorlevel 1 goto newWin
-
- echo Upgrading a previously-used copy of Windows. >>c:\insignia\up.log
-
- rem Upgrade Insignia WinSock DLLs, but don't touch MS versions.
- call updatins winsock.dll %2
- call updatins wsock32.dll %2
- goto allWin
-
- :newWin
- echo Upgrading a new copy of Windows. >>c:\insignia\up.log
-
- rem Use the Insignia WinSock DLLs by default.
- copy /y /b c:\insignia\winsock.dll %2 >>c:\insignia\up.log
- copy /y /b c:\insignia\wsock32.dll %2 >>c:\insignia\up.log
-
- rem Copy across any further files that are language specific (STARTUP.GRP)
- rem NB .grp files and progman.ini are on C: even in a split Windows setup.
- rem The name of the startup group is language-dependent.
- call findsug sg_name %5
- echo copying d:\insignia\%4\startup.%5 to c:\windows\%sg_name% >>c:\insignia\up.log
- copy /y /b d:\insignia\%4\startup.%5 c:\windows\%sg_name% >>c:\insignia\up.log
- set sg_name=
- goto allWin
-
- :allWin
- set majorVer=
- set os=
-
- rem Initially indicate we want to patch everything
- set PatchVTD=TRUE
- set PatchGDI=TRUE
- set PatchLDR=TRUE
- set PatchVMM=TRUE
- set PatchV7V=TRUE
- set PatchKRN=TRUE
-
- set WinVer=%3
-
- goto lang_%5
-
- :lang_us
- echo Updating US version of Windows
- :us_and_others
- goto PatchFiles
-
- :lang_fr
- echo Updating French version of Windows
- goto us_and_others
-
- :lang_gr
- echo Updating German version of Windows
- goto us_and_others
-
- :lang_it
- echo Updating Italian version of Windows
- goto us_and_others
-
- :lang_jp
- echo Updating Japanese version of Windows
- set PatchV7V=FALSE
- set PatchKRN=FALSE
- set WinVer=win310
- goto PatchFiles
-
- :lang_kr
- echo Updating Korean version of Windows
- set PatchV7V=FALSE
- set PatchKRN=FALSE
- set WinVer=win310
- goto PatchFiles
-
- rem What is the correct two-letter code for Thai?
- :lang_THAI
- echo Updating Thai version of Windows
- goto PatchFiles
-
- rem What is the correct two-letter code for Chinese (Simplified)?
- :lang_CHINS
- echo Updating Chinese version of Windows (Simplified)
- set PatchV7V=FALSE
- set PatchKRN=FALSE
- set WinVer=win310
- goto PatchFiles
-
- rem What is the correct two-letter code for Chinese (Traditional)?
- :lang_CHINT
- echo Updating Chinese version of Windows (Traditional)
- set PatchV7V=FALSE
- set PatchKRN=FALSE
- set WinVer=win310
- goto PatchFiles
-
- :PatchFiles
- c:
- cd \insignia
-
- rem We need to work out which VTD to patch
-
- find /v ";" c:\windows\system.ini | find /i "device=vtda.386" >nul:
- if not errorlevel 1 goto VTDASection
-
- find /v ";" c:\windows\system.ini | find /i "device=vtd.386" >nul:
- if not errorlevel 1 goto VTDSection
-
- rem The following sections patch the components we are interested in
-
- rem Patch the VTD in the WIN386 file
- if %PatchVTD%==TRUE call patchone win386.exe %2 -VTD -%WinVer%
- goto PatchTheRest
-
- :VTDASection
- rem Patch the VTDA file
- if %PatchVTD%==TRUE call patchone vtda.386 %2 -VTD -%WinVer%
- goto PatchTheRest
-
- :VTDSection
- rem Patch the VTD file
- if %PatchVTD%==TRUE call patchone vtd.386 %2 -VTD -%WinVer%
-
- :PatchTheRest
-
- :GDISection
- if %PatchGDI%==TRUE call patchone gdi.exe %2 -GDI
-
- :V7VSection
- if %PatchV7V%==TRUE call patchone v7vdd.386 %2 -V7VDD
-
- :KRNSection
- if %PatchKRN%==TRUE call patchone krnl386.exe %2 -KRNL386 -%4
-
- :LDRSection
- if %PatchLDR%==TRUE call patchone win386.exe %2 -WIN386 -LOADER -%WinVer%
-
- :VMMSection
- if %PatchVMM%==TRUE call patchone win386.exe %2 -WIN386 -VMM -%WinVer%
-
- :UpdateINIs
- win31lic /v /s%2 c:\insignia\win311.ugd >>c:\insignia\up.log
- :End